<form action="{$smarty.server.REQUEST_URI}" method="post" class="form ajax">
{if $delivery.tracking_reference}
	<a href="{$delivery.tracking_url|replace:'%reference%':$delivery.tracking_reference}">{$delivery.tracking_reference}</a>
	<input type="hidden" name="tracking_reference" value="" />
	<input type="hidden" name="delivery_id" value="{$delivery.id}" />
	<input type="image" src="/admin/backend/resources/images/icons/decline.png" alt="Remove" title="Remove" onclick="return confirm('Are you sure you want to remove this tracking reference?')" />
{else}
	<input type="text" name="tracking_reference" value="Tracking reference" class="empty" />
	<input type="hidden" name="delivery_id" value="{$delivery.id}" class="delivery_id" />
	<input type="image" src="/admin/backend/resources/images/icons/accept.png" alt="Save" title="Save" />
{/if}
</form>